--
-- Author: ping.wang
-- Date: 2019-03-08 11:09:59
--
-- PvpDuelRecordView
--

local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ViewBase)
local ListViewVertical = require("app.widget.listview.ListViewVertical")
local PvpDuelRecordRender = import(".renders.PvpDuelRecordRender")

ClassRef.VIEW_ROOT_RES = Res.PvpDuelRecordScene

function ClassRef:init()
    self._ui.Button_close:addClickEventListener(function()
        self:closeView()
    end)

    local params = {
        renderClass = PvpDuelRecordRender,
        perNum = 1,
        cellEventProxy = function(eventName, data)
        end,
    }

    self._recordList = ListViewVertical.new(self._ui.ListView, params)
    self._recordList:reloadData(self._data)


    if (not self._data) or #self._data == 0 then
        self._ui.Panel_tips:setVisible(true)
    else
        self._ui.Panel_tips:setVisible(false)
    end


end

return ClassRef
